/**
 * 小程序订单
 */

const router = require('koa-router')();
const {
  submitOrderService,
  getWXOrderListService
} = require('../../service/orderServer')

//提交订单
router.post("/api/miniapps/submitOrder", async (ctx, next) => {
  let params = ctx.request.body;
  await submitOrderService(ctx, params);
})
//获取用户订单列表
router.get("/api/miniapps/getWXOrderList", async (ctx, next) => {
  let params = ctx.request.query; //获取参数  ctx.query也可以
  await getWXOrderListService(ctx, params);
})

module.exports = router;